package main

import (
	"github.com/urfave/cli"
	"os"
	"xlq-demo/cmd"
)

func main() {
	c := cli.NewApp()
	c.Name = "demo"
	c.Usage = "demo 1.0"
	c.Commands = []cli.Command{
		{
			Name:  "api",
			Usage: "api",
			Action: func(ctx *cli.Context) error {
				cmd.RunApi()

				return nil
			},
		},
		{
			Name:  "job",
			Usage: "job",
			Action: func(ctx *cli.Context) error {
				cmd.RunJob()

				return nil
			},
		},
		{
			Name:  "test",
			Usage: "测试",
			Action: func(context *cli.Context) error {


				return nil
			},
		},

	}
	c.Run(os.Args)
}

